/*
*  Copyright 2019-2025 Zheng Jie
*
*  Licensed under the Apache License, Version 2.0 (the "License");
*  you may not use this file except in compliance with the License.
*  You may obtain a copy of the License at
*
*  http://www.apache.org/licenses/LICENSE-2.0
*
*  Unless required by applicable law or agreed to in writing, software
*  distributed under the License is distributed on an "AS IS" BASIS,
*  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*  See the License for the specific language governing permissions and
*  limitations under the License.
*/
package me.zhengjie.modules.fileupload.domain;

import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.bean.copier.CopyOptions;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.io.Serializable;

/**
* @description /
* @author ly
* @date 2025-04-25
**/
@Data
@TableName("electronic_material")
public class ElectronicMaterialFileDetailVO implements Serializable {

    String id;            // 主键id
    String materialid;            // 材料id
    String aac001;        // 个人编号
    String aaa121;        // 类型
    String originalname;  // 原始文件名
    String filename;      // 存储文件名
    String filesize;        // 文件大小(字节)
    String filetype;      // 文件类型
    String downloadUrl;   // 下载URL
    String previewurl;    // 预览URL
    String filepath;       // 文件存储路径
    String aae036;       // 时间
    String aac003;       // 姓名
    String aae100;       // 有效标志
    String name;       // 汇总材料名称
    String queryType;       // 查询类型
    String filenum;       // 文件数
    String base64;       // 文件base64


    public ElectronicMaterialFileDetailVO(String originalFilename, String safeFilename, String size, String contentType, String fileUrl, String previewUrl, String toString) {
        this.originalname = originalFilename;
        this.filename = safeFilename;
        this.filesize = size;
        this.filetype = contentType;
        this.downloadUrl = fileUrl;
        this.previewurl = previewUrl;
        this.filepath = toString;
    }

    public ElectronicMaterialFileDetailVO() {

    }

    public void copy(ElectronicMaterialFileDetailVO source){
        BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true));
    }
}
